package com.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 周恒哲
 * @date 2020/02/06
 **/
@Configuration
public class ZhzRule {
    @Bean
    public IRule myRule(){
        return new RandomRule();//默认是轮询，现在我们定义为~ zhzRandomRule
    }
}
